﻿import request from '/@/utils/request';
enum Api {
  AddProgramAll = '/api/programInfo/add',
  DeleteProgramAll = '/api/programInfo/delete',
  UpdateProgramAll = '/api/programInfo/update',
  GetProgramAllPage = '/api/programInfo/page',
  GetProgramList='/api/programInfo/list',
  ExecuteCommand='/api/programInfo/executeControl'
  
}

// 增加程序管理
export const addProgramAll = (params?: any) =>
	request({
		url: Api.AddProgramAll,
		method: 'post',
		data: params,
	});

// 删除程序管理
export const deleteProgramAll = (params?: any) => 
	request({
			url: Api.DeleteProgramAll,
			method: 'post',
			data: params,
		});

// 编辑程序管理
export const updateProgramAll = (params?: any) => 
	request({
			url: Api.UpdateProgramAll,
			method: 'post',
			data: params,
		});

// 分页查询程序管理
export const getProgramAllPageList = (params?: any) => 
	request({
			url: Api.GetProgramAllPage,
			method: 'get',
			data: params,
		});

		// 查询程序管理
export const getProgramList = (params?: any) => 
request({
		url: Api.GetProgramList,
		method: 'get',
		data: params,
	});

	// 启动程序
export const ExecuteProgram = (params?: any) => 
request({
		url: Api.ExecuteCommand,
		method: 'post',
		data: params,
	});


